#ifndef GCASE_H
#define GCASE_H

#include <QtCore/QTimer>
#include <QtGui/QBrush>
#include <QtGui/QGraphicsEllipseItem>

class QGraphicsSceneMouseEvent;
class GPlateau;
class QTimer;

class GCase : public QObject, public QGraphicsEllipseItem {
	Q_OBJECT

private:
    int m_nbGraines;
    int m_X, m_Y;
	int m_num;

	GPlateau* m_parent;

	QTimer *m_timer;

	QBrush	m_brushAct;

protected:
	void mousePressEvent(QGraphicsSceneMouseEvent *event);
	void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
	void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);

public:
	explicit GCase(int pX, int pY, int pNum, GPlateau* parent);

    inline int x() const {return m_X;}
    inline int y() const {return m_Y;}

    inline int getNbGraines() const {return m_nbGraines;}
	void setNbGraines(int pNbGraines);

signals:

private slots:
	void resetColor();
};

#endif // GCASE_H
